﻿// ------------------------------------------------------------------------------------------------
//  <copyright file="ITree.cs" company="Iveely">
//    Copyright (c) Iveely Liu.  All rights reserved.
//  </copyright>
//  
//  <Create Time>
//    03/02/2013 21:59 
//  </Create Time>
//  
//  <contact owner>
//    liufanping@iveely.com 
//  </contact owner>
//  -----------------------------------------------------------------------------------------------

#region

using System.Collections.Generic;

#endregion

namespace IveelySE.NLP.Common.DataStructure.Tree
{
    /// <summary>
    ///   树接口
    /// </summary>
    public interface ITree<T> where T : INode<T>
    {
        #region 属性或字段

        /// <summary>
        ///   获取某一深度下的所有结点
        /// </summary>
        /// <param name="depth"> 深度值 </param>
        /// <returns> 该深度下的所有结点 </returns>
        IList<INode<T>> GetNodesOnDepth(int depth);

        /// <summary>
        ///   根据Id获取结点
        /// </summary>
        /// <param name="id"> 结点编号 </param>
        /// <returns> 返回该结点编号下的结点 </returns>
        INode<T> GetNodeById(int id);

        #endregion
    }
}